// src/mixins/arrayUpdate.js
export default {
  methods: {
    $safeUpdateArray(targetArray, index, newValue) {
      if (index >= 0 && index < targetArray.length) {
        this.$set(targetArray, index, {
          ...targetArray[index],
          ...newValue
        })
        return true
      }
      return false
    }
  }
}